#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include "map.h"

#define WID 40
#define HEI 40

int main(int args, char** argv){

    srand( time(NULL));

    printf("Generation d'une map...\n");
    map mp(WID,HEI);
    map_elem stack;
    for( unsigned int x = 0; x < WID; x++){
        for( unsigned int y = 0; y < HEI; y++){
            stack.tile = 0;// | ((int)(rand()*2/RAND_MAX));
            stack.level = 0;3*sin(x)*cos(y);
            stack.status = dta_none;
            mp.setElem(x,y,&stack);
        }
    }

    file output;
    output.open("resources/map.map","wb");
    map::saveMap(&output,&mp);

    return 0;

}
